/*
 ============================================================================
 Name		: MessagingPlusAppView.cpp
 Author	  : 
 Copyright   : Your copyright notice
 Description : Application view implementation
 ============================================================================
 */

// INCLUDE FILES
#include <coemain.h>
#include "MessagingPlusAppView.h"

// ============================ MEMBER FUNCTIONS ===============================

// -----------------------------------------------------------------------------
// CMessagingPlusAppView::NewL()
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
CMessagingPlusAppView* CMessagingPlusAppView::NewL(const TRect& aRect)
{
    CMessagingPlusAppView* self = CMessagingPlusAppView::NewLC(aRect);
    CleanupStack::Pop(self);
    return self;
}

// -----------------------------------------------------------------------------
// CMessagingPlusAppView::NewLC()
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
CMessagingPlusAppView* CMessagingPlusAppView::NewLC(const TRect& aRect)
{
    CMessagingPlusAppView* self = new ( ELeave ) CMessagingPlusAppView;
    CleanupStack::PushL(self);
    self->ConstructL(aRect);
    return self;
}

// -----------------------------------------------------------------------------
// CMessagingPlusAppView::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CMessagingPlusAppView::ConstructL(const TRect& aRect)
{
    // Create a window for this application view
    CreateWindowL();

    // Set the windows size
    SetRect(aRect);

    // Activate the window, which makes it ready to be drawn
    ActivateL();
}

// -----------------------------------------------------------------------------
// CMessagingPlusAppView::CMessagingPlusAppView()
// C++ default constructor can NOT contain any code, that might leave.
// -----------------------------------------------------------------------------
//
CMessagingPlusAppView::CMessagingPlusAppView()
{
    // No implementation required
}

// -----------------------------------------------------------------------------
// CMessagingPlusAppView::~CMessagingPlusAppView()
// Destructor.
// -----------------------------------------------------------------------------
//
CMessagingPlusAppView::~CMessagingPlusAppView()
{
    // No implementation required
}

// -----------------------------------------------------------------------------
// CMessagingPlusAppView::Draw()
// Draws the display.
// -----------------------------------------------------------------------------
//
void CMessagingPlusAppView::Draw(const TRect& /*aRect*/) const
{
    // Get the standard graphics context
    CWindowGc& gc = SystemGc();

    // Gets the control's extent
    TRect drawRect(Rect());

    // Clears the screen
    gc.Clear(drawRect);

}

// -----------------------------------------------------------------------------
// CMessagingPlusAppView::SizeChanged()
// Called by framework when the view size is changed.
// -----------------------------------------------------------------------------
//
void CMessagingPlusAppView::SizeChanged()
{
    DrawNow();
}
// End of File
